<?php

/*
 * This file is part of the symfony package.
 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

class fbWebDebug extends sfWebDebug
{
    public function injectToolbar($content)
    {
        // $content .= str_ireplace('<img src="', '<img src="'.sfConfig::get('sf_w4l_base_url'), $this->asHtml());
        return $content;
    }


    public function saveLogFiles($content)
    {
        $debug = '';
        $debug .= '<style type="text/css">'.str_replace(array("\r", "\n"), ' ', $this->getStylesheet()).'</style>';
        $debug .= '<script type="text/javascript">'.$this->getJavascript().'</script>';
        $debug .= $this->asHtml();
        file_put_contents(sfConfig::get('sf_web_dir').DIRECTORY_SEPARATOR.'web_debug.html', $debug);

        file_put_contents(sfConfig::get('sf_web_dir').DIRECTORY_SEPARATOR.'web_response.html', $content);
    }
}
